"use strict";
cc._RF.push(module, '776d9+s5eVAcoSyjHIZrCdk', 'Model');
// scripts/Model.ts

Object.defineProperty(exports, "__esModule", { value: true });
var GameModel_1 = require("./GameModel");
var SettingModel_1 = require("./SettingModel");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var Model = /** @class */ (function (_super) {
    __extends(Model, _super);
    function Model() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Model_1 = Model;
    Model.loadData = function () {
        Model_1.game.readDraw();
        var dropStr = cc.sys.localStorage.getItem('dropLevel');
        if (!Model_1.isNull(dropStr)) {
            Model_1.game.dropLevel = parseInt(dropStr);
        }
        var dragStr = cc.sys.localStorage.getItem('dragLevel');
        if (!Model_1.isNull(dragStr)) {
            Model_1.game.dragLevel = parseInt(dragStr);
        }
        var preciseLevelStr = cc.sys.localStorage.getItem('preciseLevel');
        if (!Model_1.isNull(preciseLevelStr)) {
            Model_1.game.preciseLevel = parseInt(preciseLevelStr);
        }
    };
    Model.isNull = function (str) {
        if (str != null && str != undefined && str != '' && str != NaN) {
            return false;
        }
        return true;
    };
    var Model_1;
    Model.game = new GameModel_1.default();
    Model.setting = new SettingModel_1.default();
    Model = Model_1 = __decorate([
        ccclass
    ], Model);
    return Model;
}(cc.Component));
exports.default = Model;

cc._RF.pop();